void setup(){
  Serial.begin(9600);
  char extTemp[8]="T2XXXXX";
	int temp=30;
	if(temp>0){
		extTemp[2]='+';
	}else{
		extTemp[2]='-';
	}
      //unsigned int tempUn=(unsigned int)temp;
    String s=String(temp);
      if (s.length()==1) { 
        if(s.charAt(0)=='-'){
        s[0]='0';
        }                    //zero-filling per portare il valore a 4 chr
      s="000"+s;
    }
    else if(s.length()==2) {
      if(s.charAt(0)=='-'){
        s[0]='0';
      }
      s="00"+s;      
    }
    else if(s.length()==3) {
      if(s.charAt(0)=='-'){
        s[0]='0';
      }
      s="0"+s;    
    }else if(s.length()==4){
      if(s.charAt(0)=='-'){
        s[0]='0';
      }
    }
	extTemp[3]=s.charAt(0);
    extTemp[4]=s.charAt(1);
    extTemp[5]=s.charAt(2);
    extTemp[6]=s.charAt(3);
    delay(1000);
    Serial.println(extTemp);
}
void loop(){
  
  
}
